/*
 * @Descripttion: 
 * @version: 
 * @Author: zhengys
 * @Date: 2021-02-23 17:11:03
 * @LastEditors: zhengys
 * @LastEditTime: 2021-02-26 17:33:53
 */

const fs = require('fs');

exports.getFileMime = (extName) => {
  // readFileSync 为 readFile 的同步方法
  let data = fs.readFileSync('./data/mime.json'); // 注意：因为该方法在 app.js 引用，所以相对位置应以app.js为基点
  let mimeObj = JSON.parse(data.toString());
  return mimeObj[extName]
}


